<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="./css/font.css">
<link rel="stylesheet" href="./css/xadmin.css">
<script src="./lib/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="./js/xadmin.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<body>
	<div class="layui-card-body">
		<table class="layui-table">
			<tr>
				<th>学员编号</th>
				<th>学员姓名</th>
				<th>电话</th>
				<th>QQ</th>
				<th>年龄</th>
				<th>用户编号</th>
				<th>邮箱</th>
			</tr>

			<tbody id="show_coachmes">

			</tbody>
		</table>
	</div>

	<script>
		$(document).ready(function() {
			show();
		});

		function show() {
			$.ajax({
				url : "/student/all",
				type : "post",
				dataType : "json",
				success : function(data) {
					var context = "";
					for (var i = 0; i < data.length; i++) {
						var po = data[i];
						context += '<tr>' + '<th>' + po.sid + '</th>' + '<th>'
								+ po.sname + '</th>' + '<th>' + po.stel
								+ '</th>' + '<th>' + po.sqq + '</th>' + '<th>'
								+ po.sage + '</th>' + '<th>' + po.uid + '</th>'
								+ '<th>' + po.smail + '</th>' + '</tr>'
					}
					$("#show_coachmes").html(context);
				}
			});
		}
	</script>
</body>
</html>